//
//  ucfCallMgr.h
//  WXIM
//
//  Created by fusuwei on 14-10-13.
//  Copyright (c) 2014年 naren. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "XMPPFramework.h"

@protocol ucfCallMgrDelegate;



@interface ucfCallMgr : NSObject

@property  (nonatomic, weak) id <ucfCallMgrDelegate> delegate;


+ (ucfCallMgr*)sharedInstance;

- (BOOL)xmppStream:(XMPPStream *)sender didReceiveIQ:(XMPPIQ *)iq;
- (void)xmppStream:(XMPPStream *)sender didReceivePresence:(XMPPPresence *)presence;


- (BOOL)requestCreateSession:(NSString *)fromId toContact:(NSArray *)toContactIdList;

- (void)onCocketConnectToHost:(NSString*)state;


//发送录音数据
- (BOOL) sendSocketData:(NSData *)data;

- (void)btnPlay:(NSData*)data;


@end



@protocol ucfCallMgrDelegate <NSObject>

@optional

/*!
 @method
 @brief 请求创建session后的状态回调
 @discussion
 @param isSuc 是否成功
 */
- (void)requestCreateSessionState:(BOOL)isSuc;

/*!
 @method
 @brief 加入通话的用户上线状态通知
 @discussion
 @param contactId 要请求添加的好友contactId
 @param state 有online、offline状态
 */
- (void)joinSessionContactId:(NSString *)contactId state:(NSString *)state;

@end
